home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # $Id: testawk,v 1.1 1992/08/09 18:31:34 cross Exp $
- #
- # script tests whether given version of awk can handle strings
- # longer than MAX_SHORT.
- #
- if [ $# -ne 1 ]; then
- echo usage: $0 name-of-awk-program
- echo example: `basename $0` awk
- exit 1
- fi
- echo "please wait, this takes approximately 10 seconds..."
- (
- while : ; do
- echo "asdfasdfasdfasdfasdfasdfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
- done
- ) | time $1 '{
- str = str $0;
- if( NR % 100 == 0 && length(str) > 32768) {
- print "passed.";
- exit;
- }
- }'
-